Skip to content

Fix the SYNTAX_SUGGEST_DEBUG spec on Windows - #262

Merged
schneems merged 2 commits into
mainfrom
syntax-suggest-debug-spec-windows
Sep 11, 2026
Merged

schneems merged 2 commits into
mainfrom
syntax-suggest-debug-spec-windows

Conversation

@hsbt

@hsbt hsbt commented Sep 11, 2026

Copy link
Copy Markdown
Member

The SYNTAX_SUGGEST_DEBUG spec added in #261 fails on Windows. The backtick command runs through cmd.exe, which does not understand the POSIX VAR=value command form and tries to run SYNTAX_SUGGEST_DEBUG as a command. The spec then gets 'SYNTAX_SUGGEST_DEBUG' is not recognized as an internal or external command instead of the expected error.

https://github.com/ruby/ruby/actions/runs/34515928495/job/103002536286

This passes the variable through the env hash of IO.popen instead. It is a forward-port of ruby/ruby#18757, so the spec now matches ruby/ruby byte for byte. The CI here runs on Ubuntu only and cannot catch this.

Generated with Claude Code

hsbt and others added 2 commits September 11, 2026 10:19
cmd.exe does not understand the POSIX `VAR=value command` form and
tried to run SYNTAX_SUGGEST_DEBUG as a command.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@schneems

Copy link
Copy Markdown
Collaborator

Thanks. We should probably add one smoke test for windows CI here.

@schneems
schneems merged commit 2aacc66 into main Sep 11, 2026
37 checks passed
@schneems
schneems deleted the syntax-suggest-debug-spec-windows branch September 11, 2026 02:20
schneems added a commit that referenced this pull request Sep 11, 2026
Would have caught #262 before going into main.
Earlopain pushed a commit to Earlopain/syntax_suggest that referenced this pull request Sep 15, 2026
The windows-latest leg added in ruby#263 reports success without running any tests. bin/rake is a bash script (it begins with a /usr/bin/env bash shebang), but the test step sets no shell:, and windows-latest defaults to PowerShell, which cannot execute the extensionless binstub. The step exits 0 with no output (about 1s, zero rspec examples) while the check shows green, a false green that guards nothing.

Set a job-level defaults.run.shell: bash so bin/rake test runs under Git Bash (present on the Windows runner) on every OS. bash is already the default on Ubuntu, so the existing Linux matrix is unaffected.

This makes the Windows job actually execute the suite, which is what ruby#263 intended: the SYNTAX_SUGGEST_DEBUG spec fixed in ruby#262 shells out via a Ruby backtick that runs through cmd.exe on Windows, so a regression in it now surfaces as a real failure instead of passing silently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants